﻿using System.Data;
using System.Data.SqlClient;
using LoverMeeting.Model.Entity;

namespace LoverMeeting.DataBase.DataMappers
{
    public class LoverAccountMapper : IDataMapper<LoverAccount>
    {
        public LoverAccount GetData(IDataReader reader)
        {
            var entity = new LoverAccount();
            entity.Id = int.Parse(reader["LoverAccountId"].ToString());
            entity.ActivationCode = reader["ActivationCode"].ToString();
            entity.IsActive = (bool) reader["IsActive"];
            entity.IsAdmin = (bool) reader["IsAdmin"];
            entity.IsBlockedByAdmin = (bool) reader["IsBlockedByAdmin"];
            return entity;
        }

        public void SetParameter(SqlCommand command, LoverAccount entity)
        {
            throw new System.NotImplementedException();
        }

        public int GetRecordCount(IDataReader reader)
        {
            throw new System.NotImplementedException();
        }
    }
}
